<?php
	/*
	参考资料：
	http://www.cnblogs.com/c3055/archive/2011/08/18/2143832.html
	*/
	
	/*
	定义基本的变量
	*/
	
	$bhUri="https://my.bluehost.com/cgi-bin/cplogin";
	$bhUserName="zhenfeic";
	$bhPassword="aaAbc123456!";
	$request="ldomain=$bhUserName&lpass=$bhPassword";
	
	/*
	CURL的基本操作
	*/
	
	// 1. 初始化
	$ch = curl_init();
	// 2. 设置选项，包括URL
	curl_setopt($ch, CURLOPT_URL, $bhUri);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_HEADER, 0);
	curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11");
	curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
	
	// 3. 执行并获取HTML文档内容
	$output = curl_exec($ch);
	print_r($output);
	// 4. 释放curl句柄
	curl_close($ch);
	
	
	
	